package com.huluobo.lc.kotlinim1803a

import android.app.Application
import androidx.multidex.MultiDex
import cn.bmob.v3.Bmob
import com.hyphenate.chat.EMClient
import com.hyphenate.chat.EMOptions

/**
 * @author Lc
 * @description: 全局Application,作用是一些SDK的初始化
 * @date :2020/9/10 19:59
 */
class IMApplication : Application() {
    companion object {
        lateinit var instance: IMApplication
    }

    override fun onCreate() {
        super.onCreate()
        instance = this
        MultiDex.install(this)//初始化方法65535限制解除
        //环信初始化
        EMClient.getInstance().init(applicationContext, EMOptions());
//在做打包混淆时，关闭debug模式，避免消耗不必要的资源
        EMClient.getInstance().setDebugMode(true);

        //Bmob初始化
        Bmob.initialize(applicationContext, "32fb2108adfd53d942445a64078d15b2")
    }
}